#ifndef ALARM_H
#define ALARM_H

#include <QDialog>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QPalette>
#include <QColor>
#include <QToolTip>
#include <QString>
#include <phonon>
#include <iostream>
#include <QKeyEvent>

class Alarm : public QDialog
{  
  Q_OBJECT     
  public:
      Alarm(); 
  private slots:
    void setAlarm();
    void setAudio();
    void playAudio();
    void stopAudio();
    void setUrl();    
    void openUrl();    
    void _about();    
    
  private:
    QAction *aboutAction;
    QAction *quitAction;
    QAction *setalarm;
    QAction *setaudio;
    QAction *playaudio;
    QAction *stopaudio;
    QAction *seturl;
    QAction *openurl;
    QAction *aboutQtAction;
    QSystemTrayIcon *trayIcon;
    QMenu *trayIconMenu;
    QUrl * url;
    QProcess *playFile;    
    void createActions();
    void createTrayIcon();    
    void startAlarm();    
    void init();        
    void updateTrayIcon();  
    int getRepeat();
    int timer;
    int repeat; 
    QString alarmTime;    
    QString alarmDate;         
    QString alarmDay;
    Phonon::MediaObject *music;
    Phonon::State state;  
    QString path;
    QString imgfile;
}; 

#endif 
